package org.xs.web.http.provider;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
 
public interface HTTPRequest {
	public boolean GET();
	public boolean POST();
	public boolean isJson();
	public boolean isHtml();
	public String controllerName();
	public String actionName();
	public HttpServletRequest getDelegate();
	public HTTPHeader header(String name);
	public List<HTTPHeader> headers();
	public List<HTTPHeader> headers(String name);
	
	public String getPath();
	public String uri();
	public String contextPath();
	public String url();
	
	boolean hasSessionId() ;
	boolean isSessionIdValid() ;
	boolean isUserInRole(String role);
	public String sessionId() ;
	public HTTPSession session();
	public HTTPSession session(boolean create);
	
	public HTTPCookie cookie(String name);
	public List<HTTPCookie> cookies();
	
	public String getAuthType() ;
	public String getContextPath() ;
	public String getHeader(String name) ; 
	public String getMethod() ;
	public String getPathInfo() ;
	public String getQueryString() ;
	
	public String getRequestURI() ;

	public Map<String, Object> params();
	public String tirmPath();
}

